package demo1;

public class Two {
    public static void main3(String[] args) {
        int count = 0;
        for (int i = 1; i <= 1000; i++) {
            if (i % 2 == 0 || i % 3 == 0 || i % 5 == 0 || i % 7 == 0) {
                count++;
                //System.out.println(i);
            }
        }
        System.out.println(count);
    }
    //第二题
    public static void main2(String[] args) {
        int n = 5;
        int count = 1;
        do {
            count *= n;
        }while(--n > 0);
        System.out.println(count);
    }
    //第一题
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i < 100; i++) {
            if (i % 2 != 0) {
                sum += i;
            }
            System.out.print(i + " ");
        }
        System.out.println(sum);
    }
}
